const Router = require('koa-router');
const https = require('https')
const request = require('request')
const router = new Router();

router.get('/',async (ctx, next) => {
    await ctx.render('/pages/index',{title:'HOME-RupeeMama Loans'})
});

// router.get('aboutus',async (ctx, next) => {
//     await ctx.render('/pages/aboutus',{title:'About Us - RupeeMama'})
// });

// router.get('contactus',async (ctx, next) => {
//     await ctx.render('/pages/contactus',{title:'Contact Us - RupeeMama'})
// });

router.get('faqs',async (ctx, next) => {
    await ctx.render('/pages/faqs',{title:'FAQs - RupeeMama'})
});

router.get('product',async (ctx, next) => {
  await ctx.render('/pages/product', { title:'Product - RupeeMama'})
});

router.get('assistance',async (ctx, next) => {
    await ctx.render('/pages/assistance', { title:'CoVid-19 Assistance'})
});

router.get('assistance-recorded',async (ctx, next) => {
    await ctx.render('/pages/extension-request', { title:'Assistance Request'})
});


router.get('privacypolicy',async (ctx, next) => {
  await ctx.render('/pages/privacypolicy', { title:'Privacy Policy - RupeeMama'})
});
router.get('termsOfService',async (ctx, next) => {
  await ctx.render('/pages/termsOfService', { title:'Terms Of Service - RupeeMama'})
});
// router.get('myLoan',async (ctx, next) => {
//   await ctx.render('/pages/myLoan',{title:'My Loan - RupeeMama'})
// });

// router.get('login',async (ctx, next) => {
//   await ctx.render('/pages/login',{title:'Login - RupeeMama'})
// });

// router.all('loanResult',async (ctx, next) => {
//   await ctx.render('/pages/loanResult',{title:'loanResult - RupeeMama'})
// });

// chat box
router.all('assistant',async (ctx, next) => {
  await ctx.render('/pages/assistant')
});

router.get('*', async (ctx, res)=>{
  return ctx.render('/pages/404',{title:'404 - RupeeMama'})
}); 
module.exports = router;
